package com.itfreer.gis.map.style.entity;

import java.io.Serializable;

import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.form.api.reflect.DictionaryField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * 定义样式图层实体
 */
@Entity(name = "gis_map_style_layer")
public class MapStyleLayerEntity extends EntityBase implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id
    @Column(name = "id", length = 50, nullable = false)
    private String id;

    /**
     * 图层名称
     */
    @Column(name = "s_name", length = 50, nullable = true)
    private String name;

    /**
     * 图层类型
     */
    @Column(name = "s_type", length = 50, nullable = true)
    @DictionaryField(dictionaryName = "d_layer_type", toFieldName = "typeName")
    private String type;

    @Transient
    private String typeName;

    /**
     * 数据源名称
     */
    @Column(name = "s_source", length = 255, nullable = true)
    private String source;

    /**
     * 数据源图层名
     */
    @Column(name = "s_source_layer", length = 255, nullable = true)
    private String sourceLayer;

    /**
     * 布局属性
     */
    @Column(name = "s_layout", nullable = true, columnDefinition = "text")
    private String layout;
    /**
     * 绘画属性
     */
    @Column(name = "s_paint", nullable = true, columnDefinition = "text")
    private String paint;
    /**
     * 图层过滤
     */
    @Column(name = "s_filter", nullable = true, columnDefinition = "text")
    private String filter;
    /**
     * 最大级别
     */
    @Column(name = "f_maxzoom", nullable = true)
    private Float maxzoom;
    /**
     * 最小级别
     */
    @Column(name = "f_minzoom", nullable = true)
    private Float minzoom;
    /**
     * 其他属性
     */
    @Column(name = "s_propertys", nullable = true, columnDefinition = "text")
    private String propertys;
    /**
     * 外键
     */
    @Column(name = "s_style_id", length = 255, nullable = true)
    private String styleId;

    /**
     * 排序
     */
    @Column(name = "i_order", length = 8, nullable = true)
    private Integer order;

    /**
     * 图层列表排序
     */
    @Column(name = "i_listOrder", length = 8, nullable = true)
    private Integer listOrder;

    /**
     * 类型-图层组与图层
     */
    @Column(name = "s_group", length = 10, nullable = true)
    @DictionaryField(dictionaryName = "d_dictype", toFieldName = "groupName")
    private String group;

    @Transient
    private String groupName;

    /**
     * 上级ID值
     */
    @Column(name = "pid", length = 50, nullable = true)
    private String pid;

    /**
     * 是否最后节点
     */
    @Column(name = "b_leaf", nullable = true)
    private Boolean leaf;

    /**
     * 是否显示-用于图层组管理
     */
    @Column(name = "b_show", nullable = true)
    private Boolean show;

    /**
     * 是否选中-用于列表展示
     */
    @Column(name = "b_checked", nullable = true)
    private Boolean checked;

    /**
     * 属性分组ID
     */
    @Column(name = "s_groupid", length = 50, nullable = true)
    private String groupid;
    
    /**
	 * 指标id
	 */
	@Column(name = "s_indexdata", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "indexclummn", toFieldName = "indexDataName")
	private String indexData;
	
	/**
	 * 指标名称
	 */
	@Transient
	private String indexDataName;
	
	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantid", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantname", length = 50, nullable = true)
	private String tenantName;
	
	/**
	 * 指标id
	 */
	public String getIndexData() {
		return indexData;
	}

	/**
	 * 指标id
	 */
	public void setIndexData(String indexData) {
		this.indexData = indexData;
	}

	/**
	 * 指标名称
	 */
	@Transient
	public String getIndexDataName() {
		return indexDataName;
	}

	/**
	 * 指标名称
	 */
	public void setIndexDataName(String indexDataName) {
		this.indexDataName = indexDataName;
	}

    /**
     * id
     */
    public String getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(String value) {
        this.id = value;
    }

    /**
     * 图层名称
     */
    public String getName() {
        return name;
    }

    /**
     * 图层名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 图层类型
     */
    public String getType() {
        return type;
    }

    /**
     * 图层类型
     */
    public void setType(String value) {
        this.type = value;
    }

    @Transient
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    /**
     * 数据源标识
     */
    public String getSource() {
        return source;
    }

    /**
     * 数据源标识
     */
    public void setSource(String value) {
        this.source = value;
    }

    /**
     * 数据源图层名
     */
    public String getSourceLayer() {
        return sourceLayer;
    }

    /**
     * 数据源图层名
     */
    public void setSourceLayer(String value) {
        this.sourceLayer = value;
    }

    /**
     * 布局属性
     */
    public String getLayout() {
        return layout;
    }

    /**
     * 布局属性
     */
    public void setLayout(String value) {
        this.layout = value;
    }

    /**
     * 绘画属性
     */
    public String getPaint() {
        return paint;
    }

    /**
     * 绘画属性
     */
    public void setPaint(String value) {
        this.paint = value;
    }

    /**
     * 图层列表排序
     */
    public Integer getListOrder() {
        return listOrder;
    }

    /**
     * 图层列表排序
     */
    public void setListOrder(Integer listOrder) {
        this.listOrder = listOrder;
    }

    /**
     * 图层过滤
     */
    public String getFilter() {
        return filter;
    }

    /**
     * 图层过滤
     */
    public void setFilter(String value) {
        this.filter = value;
    }

    /**
     * 最大级别
     */
    public Float getMaxzoom() {
        return maxzoom;
    }

    /**
     * 最大级别
     */
    public void setMaxzoom(Float value) {
        this.maxzoom = value;
    }

    /**
     * 最小级别
     */
    public Float getMinzoom() {
        return minzoom;
    }

    /**
     * 最小级别
     */
    public void setMinzoom(Float value) {
        this.minzoom = value;
    }

    /**
     * 其他属性
     */
    public String getPropertys() {
        return propertys;
    }

    /**
     * 其他属性
     */
    public void setPropertys(String value) {
        this.propertys = value;
    }

    public String getStyleId() {
        return styleId;
    }

    public void setStyleId(String styleId) {

        this.styleId = styleId;
    }

    // 排序

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Boolean getLeaf() {
        return leaf;
    }

    public void setLeaf(Boolean leaf) {
        this.leaf = leaf;
    }

    public Boolean getShow() {
        return show;
    }

    public void setShow(Boolean show) {
        this.show = show;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getGroupid() {
        return groupid;
    }

    public void setGroupid(String groupid) {
        this.groupid = groupid;
    }
    
    public String getTenantID() {
		return tenantID;
	}

	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}
}
